<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>HTML5大文件分片上传示例</title>
    <script src="./js/spark-md5.js"></script>
    <script src="./js/sha1.js"></script>
    <script src="./js/common.js"></script>
    <script>

        let init = () => {
            //使用默认上传视图
            (new fileUploadPage).html({
                api:{
                    upload: "./upload.php",
                    status: "./status.php",
                    download: "./download.php?"
                }
            });
            /*
            //自定义视图，页面需要自己写
            (new fileUploadPage).init({
                elem:{
                    output: "#output",
                    uploadBtn: "#upload",
                    fileInput: "#file",
                    processBar: "#vipkwd-upload-bar"
                },
                api:{
                    upload: "./upload.php",
                    status: "./status.php",
                    download: "./download.php?"
                }
            });
            */
        };

        if(typeof document.ready === 'function'){
            document.ready(function(){
                init();
            });
        }else{
            setTimeout(() => {
                init();
            }, 2000);
        }
    </script>
</head>
<body>
</body>
</html>